# -*- encoding: utf-8 -*-
require File.expand_path("../config/boot.rb", __FILE__)
require './app'
require 'sidekiq/web'
require 'genghis'

Faye::WebSocket.load_adapter('thin')

run Rack::URLMap.new(
  '/' => App, 
  '/sidekiq' => Sidekiq::Web, 
  '/mongo' => Genghis::Server.new
)

memory_usage = (`ps -o rss= -p #{$$}`.to_i / 1024.00).round(2)
puts "=> Memory usage: #{memory_usage} Mb"